package com.yodawnla.attackTitan2;

import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.opengl.texture.region.TextureRegion;

import com.yodawnla.attackTitan2.scene.GameScene;
import com.yodawnla.attackTitan2.system.Tex;

public class Castle extends Sprite
{
	Sprite mCannon;
	GameScene mScene;
	
	public Castle(GameScene scene, float pX, float pY, TextureRegion pTextureRegion)
	{
		super(pX, pY, pTextureRegion);
		
		mScene = scene;
		
		mCannon = new Sprite(0, 0, mScene.getTexture(Tex.Cannon));
		mCannon.setPosition((getWidth() - mCannon.getWidth())/2, (getHeight() - mCannon.getHeight())/2);
		attachChild(mCannon);
	}
	
	public void setCannonRotation(float rotation)
	{
		mCannon.setRotation(rotation);
	}
}